using System;
using HslCommunication;

namespace Catastrophe.AutoSulution.TaskM
{
	public interface ITaskFormater
	{
		/// <summary>
		/// 任务步骤详情
		/// </summary>
		/// <param name="ischedule">调度对象</param>
		/// <param name="taskParam">调度参数</param>
		/// <returns></returns>
		string GetTaskStepDetails(IScheduleControl ischedule, TaskComplete taskParam);

		/// <summary>
		/// 任务状态
		/// </summary>
		/// <param name="ischedule">调度对象</param>
		/// <param name="taskParam">调度参数</param>
		/// <returns></returns>
		string GetTaskRunState(IScheduleControl ischedule, TaskComplete taskParam);

		/// <summary>
		/// 获取运行结果 false表示发生了异常
		/// </summary>
		/// <param name="ischedule">调度对象</param>
		/// <param name="taskParam">调度参数</param>
		/// <returns></returns>
		OperateResult RunResult(IScheduleControl ischedule, TaskComplete taskParam);

		/// <summary>
		/// 当前任务预览-TaskComplete.Param.ToString()
		/// 需要对象TaskComplete.Param重写ToString()方法
		/// </summary>
		/// <param name="ischedule">调度对象</param>
		/// <param name="taskParam">调度参数</param>
		/// <returns></returns>
		string GetTaskNowDescribe(IScheduleControl ischedule, TaskComplete taskParam);

		/// <summary>
		/// 获取任务进度
		/// </summary>
		/// <param name="ischedule">调度对象</param>
		/// <param name="taskParam">调度参数</param>
		/// <returns></returns>
		Tuple<int, int> GetProcess(IScheduleControl ischedule, TaskComplete taskParam);
	}
}
